 <template>
  <div>
    <!-- <router-link to="/Cy" tag="button">
      跳转
    </router-link> -->
    <button @click="tz">
      跳转
    </button>
  </div>
</template>
 <script>
export default {
  data() {
    return {
      id:1
    };
  },
  methods: {
    tz(){
      //路由跳转的三种方式
      // this.$router.push("/Cy")  
      // this.$router.push({name:"Cy",params:{id:1}})
      // this.$router.push({name:"Cy", query:{id:1}})
      this.$router.push({path:"/Cy",query:{id:1}})
      // this.$router.push({path:"/Cy",params:{id:1}})  !不支持path用params传参
    }
  },
  computed: {},
};
</script>
 <style lang='css'>
</style>